import server from '../../server'

// 请求头部轮播图数据
const getBanners = async () => {
    let {data} = await server.get('/small4/banner/list')
    return data
}
// 获取商品列表
const getGoodsList = async () => {
    let {data} = await server.get('/small4/shop/goods/list')
    return data

}
// 获取商品列表详情
const getGoodsDetail = async function(id) {
    const  {data}  = await server.post('/small4/shop/goods/detail?id=' + id)
    
    return data.data;
}

// 获取精选列表数据
const getArticle = async () => {
    let {data} = await server.get('/small4/cms/news/list')
    return data

}
// 精选详情
const jxDetail = async function(id) {
    const { data } = await server.get('/small4/cms/news/detail?id=' + id)
    
    return data.data;
}
// 获取详情数据的评价
const getReputation = async function(id) {
    const  {data}  = await server.post('small4/shop/goods/reputation?id=' + id)
    
    return data;
}


// 获取砍价数据


export {
    getBanners,
    getGoodsList,
    getArticle,
    jxDetail,
    getGoodsDetail,
    getReputation,
}